<%@ page language="java" contentType="text/html;charset=UTF-8"%>
<%@ include file="/commons/taglibs.jsp"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>家庭成员信息&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</title>
<script language="JavaScript" type="text/javascript" src="${ctx}/scripts/common/prototype.js"></script>
<script language="JavaScript" type="text/javascript" src="${ctx}/scripts/public.js"></script>
<script language="JavaScript"  src="${ctx}/scripts/show.js"></script>
<script language="JavaScript" type="text/javascript" src="${ctx}/scripts/global.js"></script>
<link href="${ctx}/styles/extremetable/style.css" type="text/css" rel="stylesheet" />
<link href="${ctx}/styles/grid.css" rel="stylesheet" type="text/css">
<link href="${ctx}/styles/listTable.css" rel="stylesheet" type="text/css">
<link href="${ctx}/styles/show.css" rel="stylesheet" type="text/css" />
<link href="${ctx}/styles/public.css" rel="stylesheet" type="text/css">
<link href="${ctx}/styles/aux_window.css" rel="stylesheet" type="text/css">
<link href="${ctx}/styles/extremetable/extremecomponents.css" type="text/css" rel="stylesheet" />
<script language="JavaScript" type="text/javascript" src="${ctx}/scripts/public3.js"></script>
<script language="JavaScript" type="text/javascript" src="${ctx}/scripts/rightmenu2.js"></script>
<script language="JavaScript" type="text/javascript" src="${ctx}/scripts/div/common.js"></script>
<script language="JavaScript" type="text/javascript" src="${ctx}/scripts/common.js"></script>
<script type="text/javascript" src="${ctx}/scripts/div/window.js"></script>
<script language="JavaScript" type="text/javascript" src="${ctx}/scripts/extremetable/extremecomponents.js"></script>
<script>

function next(url){
	window.location.href = url;
}

function quickMenue1(event)
	{

		ShowContextMenu(event,'quick_rightmenu');

	}
	function quickMenue2(event)
	{
		ShowContextMenu(event,'quick_rightmenu2');
	}
	function quickMenue3(event)
	{
		ShowContextMenu(event,'quick_rightmenu3');
	}



	function refurbishLesseeList(){
	flag_button_click=false;

	document.getElementById("memberInfoList").src="${ctx}/customer_memberAction.do?method=showMemberInfoList&keyId=${keyId}";
	}

///////////

	var ACTION_URL="${ctx}/customer_memberAction.do?";
	//家庭人员详细信息
	function showDetail(){
		 var url = ACTION_URL + "method=showOneMemberParticularInfo&ownerId="+getEdit_guestRecordId()+"&paticpantId="+getEdit_oldId()+"&houseId="+getEdit_houseRecordId();
		 top.windowOpen(url,'renderMemberParticularInfo','家庭成员详细资料',670,900);
		//window.showModalDialog('aux_order_zh_detail2.htm',window,'dialogWidth:900px;dialogHeight:590px;help:no;status:no;scroll:no;center');
	}

	function openAddMember(){
		var url=ACTION_URL + "method=initMemberAdd&keyId=${keyId}";
		top.windowOpen(url, "initMemberAdd", "新增家庭成员", 550, 750);
	}

	function openEditMember(){
		if(getEdit_guestRecordId()!="" && getEdit_guestRecordId() != undefined){
			var url=ACTION_URL + "method=initMemberEdit&keyId=${keyId}&ownerId="+getEdit_guestRecordId()+"&paticpantId="+getEdit_oldId()+"&houseId="+getEdit_houseRecordId();
			top.windowOpen(url, 'initMemberEdit', '修改家庭成员', 550, 750);
		}else{
			Alert("修改之前请先选择记录");
		}
	}

	function search(){
		var url= ACTION_URL + "method=callInPersonList";
		$('fSearch').action=url;
		$('fSearch').submit();
	}

	function initIframeURL(){
		var url= ACTION_URL + "method=initmemberBaseList&keyId=${keyId}";
		$('callInPersonList').src=url;
	}
	//删除人员信息
	function showDelete(){
		var url=ACTION_URL + "method=deleteMember&ownerId="+getEdit_guestRecordId()+"&paticpantId="+getEdit_oldId()+"&houseId="+getEdit_houseRecordId();
		if(getEdit_guestRecordId()==""){
			Alert("请先选择您要删除的记录");
		}else{
			var result=confirm("你确定删除此条记录吗？")
			if(result){
				deleteCallInPerson(url);
			}
		}
	}

	//执行操作
	function deleteCallInPerson(url){
		var myAjax = new Ajax.Request(
	                   url,
	                   {method: 'post', parameters:"" , onComplete: showResponseDelete}
	                   );
	}

	function showResponseDelete(transport){
		if(transport.responseText=="false"){
			Alert("删除失败");
		}else{
			reLoadIFrameList()();
		}
	}
	//重新加载列表页面,不保留条件的刷新
	function reLoadIFrameList(){
		var url= ACTION_URL + "method=initmemberBaseList&keyId=${keyId}";
		$('memberBaseList').src=url;
	}

	//重新加载列表页面,保留查询条件的刷新
	function reLoadIFrameListWithQuery(){
		window.frames("memberBaseList").freshFrame();
	}


	//获取当前选择的记录
	function getEdit_guestRecordId(){
		var obj=document.frames("memberBaseList").document.all;
		return obj.edit_guestRecordId.value;
	}
	function getEdit_houseRecordId(){
		var obj=document.frames("memberBaseList").document.all;
		return obj.edit_houseRecordId.value;
	}
	function getEdit_oldId(){
		var obj=document.frames("memberBaseList").document.all;
		return obj.edit_oldId.value;
	}


</script>
</head>
<body>
 <div style="overflow:auto; height:400px;">
        <table width="100%" border="0" cellpadding="0" cellspacing="0" class="aux_intable_color"  style="display:show">
                          <tr>
                            <td colspan="4" class="aux_titletable">家庭成员信息</td>
                          </tr>
                        </table>
                        <table width="100%" border="0" cellpadding="0" cellspacing="0" class="tab_line">
                        <tr>
                          <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0" >
                              <tr>
                                <td class="bg_toolBar"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                                    <tr>
                                      <td width="35%" align="right"><table border="0" cellpadding="0" cellspacing="0" id="ico1">
                                          <tr>
                                            <td class="toolbarico"><a href="#"  onclick="openAddMember()" onfocus="this.blur()"><img src="${ctx}/images/ico_newfile.gif" border="0" align="absbottom" alt="新建"/>&nbsp;</a></td>
                                            <td  class="toolbarico" ><a href="#" onFocus="this.blur()" onClick="openEditMember();"help:no;status:no;scroll:no;center');"><img src="${ctx}/images/ico_amend.gif" alt="修改" width="16" height="16" border="0" align="absbottom" /></a></td>
                                            <td class="toolbarico"><a href="#" onClick="showDelete();" onFocus="this.blur()"><img src="${ctx}/images/ico_delete.gif" alt="删除" width="16" height="16" border="0" align="absbottom"></a></td>
                                            <td  class="toolbarico">&nbsp;</td>
                                          </tr>
                                      </table></td>
                                    </tr>
                                </table></td>
                              </tr>
                              <tr>
                                <td colspan="5" >
                                	<iframe id="memberBaseList"  name="memberBaseList" frameborder="0" src="${ctx}/customer_memberAction.do?method=initmemberBaseList&keyId=${keyId}" width="100%" ></iframe>
                                </td>
                        </tr>
                      </table></td>
                    </tr>
                </table></td>
              </tr>
          </table></td>
        </tr>
      </table>

</td>
</tr>
</table>
</td>
</tr>
</table>
</div>


</body>
</html>